From 02935afe942924c9612650946f4422c1da431639 Mon Sep 17 00:00:00 2001 From: Luca Bacci Date: Tue, 16 Jul 2019 12:43:43 +0200 Subject: [PATCH] GtkFileChooserNativeWin32: Uninitialize COM at end of thread GtkFileChooserNativeWin32 is created and shown on a secondary thread. This thread initializes COM support with CoInitializeEx but does not finalize it, so we have a leak. Fix that by calling CoUninitialize() before thread terminates. See Merge Request !1043 --- gtk/gtkfilechoosernativewin32.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gtk/gtkfilechoosernativewin32.c b/gtk/gtkfilechoosernativewin32.c index 4bab4ef00f..3bb81be29c 100644 --- a/gtk/gtkfilechoosernativewin32.c +++ b/gtk/gtkfilechoosernativewin32.c @@ -792,6 +792,8 @@ filechooser_win32_thread (gpointer _data) IFileDialog_Release ((IUnknown *)pfd); + CoUninitialize(); + g_main_context_invoke (NULL, filechooser_win32_thread_done, data); -- 2.30.2